﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace OurSite.Business.Picture
{
    public enum PeopleCategory
    {
        IsHardenListingImage = 1,
        IsRyanListingImage = 2,
        IsFriendListingImage = 3
    }

    public class People : BaseClass
    {
        private Nullable<DateTime> dob = DateTime.MinValue;
        protected IList<Picture> pictures;
        protected IList<Video.Video> videos;

        public virtual Guid PeopleId { get; set; }
        public virtual string FirstName { get; set; }
        public virtual string LastName { get; set; }
        public virtual string MaidenName { get; set; }
        public virtual bool IsHuman { get; set; }
        public virtual Nullable<DateTime> BirthDate { get; set; }
        public override string Name
        {
            get
            {
                if (!string.IsNullOrEmpty(MaidenName))
                    return FirstName + " " + MaidenName + "-" + LastName;
                
                return FirstName + " " + LastName;
            }

        }
        public virtual IList<Picture> Pictures
        {
            get
            {
                if (pictures == null)
                    return new List<Picture>();

                return pictures;
            }
            set { pictures = value; }
        }
        public virtual IList<Video.Video> Videos 
        {
            get
            {
                if (videos == null)
                    return new List<Video.Video>();

                return videos;
            }
            set { videos = value; }
        }
    }
}
